package zero.tech.games.gate.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import feign.Param;
import zero.tech.games.entity.games.ClubMemberWaterpak;

public interface ClubMemberWaterpakMapper {
	@Delete("delete from club_member_waterpak where club_id=#{club_id} and uid=#{uid}")
	void delete(@Param("club_id")int club_id, @Param("uid")int uid);

	@Select("select * from club_member_waterpak where club_id=#{club_id} and uid=#{uid}")
	ClubMemberWaterpak getClubMemberWaterpak(int club_id, int uid);

	@Update("update club_member_waterpak set extract_total=extract_total-#{gold} where club_id=#{club_id} and uid=#{uid}")
	void reduceExtract(int club_id, int uid, long gold);

}
